home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCaaaarrrrpppp((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) CCCCaaaarrrrpppp((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- carp - warn of errors (from perspective of caller)
-
- cluck - warn of errors with stack backtrace
- (not exported by default)
-
- croak - die of errors (from perspective of caller)
-
- confess - die of errors with stack backtrace
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use Carp;
- croak "We're outta here!";
-
- use Carp qw(cluck);
- cluck "This is how we got here!";
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The Carp routines are useful in your own modules because
- they act like _d_i_e() or _w_a_r_n(), but report where the error
- was in the code they were called from. Thus if you have a
- routine _F_o_o() that has a _c_a_r_p() in it, then the _c_a_r_p() will
- report the error as occurring where _F_o_o() was called, not
- where _c_a_r_p() was called.
-
- FFFFoooorrrrcccciiiinnnngggg aaaa SSSSttttaaaacccckkkk TTTTrrrraaaacccceeee
-
- As a debugging aid, you can force Carp to treat a croak as a
- confess and a carp as a cluck across _a_l_l modules. In other
- words, force a detailed stack trace to be given. This can
- be very helpful when trying to understand why, or from
- where, a warning or error is being generated.
-
- This feature is enabled by 'importing' the non-existant
- symbol 'verbose'. You would typically enable it by saying
-
- perl -MCarp=verbose script.pl
-
- or by including the string MCarp=verbose in the the _P_E_R_L_5_O_P_T
- manpage environment variable.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 1 (printed 10/23/98)
-
-
-
-